home *** CD-ROM | disk | FTP | other *** search
- /*
- ** patch.library
- **
- ** Copyright © 1993-1997 by Stefan Fuchs
- ** Freely distributable.
- */
-
- #ifndef _PATCH_INCLUDES_H
- #include "patch_includes.h"
- #endif
-
-
- /****** patch.library/InstallPatch ***************************************
- *
- * NAME
- * InstallPatch -- Installs a patchroutine for library functions.
- *
- * SYNOPSIS
- * patch = InstallPatch( newpatch )
- * D0 A0
- *
- * struct Patch *InstallPatch( struct NewPatch * );
- *
- * FUNCTION
- * This function exists only for historic reasons. It will internally
- * routed back to InstallPatchTags(). Because InstallPatchTags()
- * has advanced features there is definitely no need to call this
- * function at all.
- *
- * INPUTS
- * newpatch = pointer to an instance of a NewPatch structure
- *
- * RESULT
- * patch = pointer to a patch structure or NULL on failure
- *
- * NOTES
- *
- * BUGS
- *
- * SEE ALSO
- * InstallPatchTags(), patchobsolete.h
- *
- ******************************************************************************
- *
- */
-
- struct Patch * LIBFUNC InstallPatch( REGA0 struct NewPatch *newpatch GNUC_REGA0)
- {
- struct TagItem taglist[7];
-
- taglist[0].ti_Tag = PATT_NewCodeSize;
- taglist[0].ti_Data = newpatch->NPAT_NewCodeSize;
-
- taglist[1].ti_Tag = PATT_LibraryName;
- taglist[1].ti_Data = (ULONG)newpatch->NPAT_LibraryName;
-
- taglist[2].ti_Tag = PATT_LibVersion;
- taglist[2].ti_Data = newpatch->NPAT_LibVersion;
-
- taglist[3].ti_Tag = PATT_Priority;
- taglist[3].ti_Data = newpatch->NPAT_Priority;
-
- taglist[4].ti_Tag = PATT_PatchName;
- taglist[4].ti_Data = (ULONG)newpatch->NPAT_PatchName;
-
- taglist[5].ti_Tag = PATT_Result2;
- taglist[5].ti_Data = (ULONG)newpatch->NPAT_Result2;
-
- taglist[6].ti_Tag = TAG_DONE;
-
- return(InstallPatchTagsA(newpatch->NPAT_NewCode, newpatch->NPAT_LVO, taglist));
- }
-